<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<!--<input type="text" id="ipt" value="iphone"/>-->
<input type="button" id="btn" value="隐藏"/><br>
<div id="box"></div>
<script>
    var btn = document.getElementById("btn");

   // console.dir(box);
   // var ipt = document.getElementById("ipt");
   /* ipt.onfocus = function () {
        if (this.value === "iphone") {
            this.value = "";
        }
    }
    ipt.onblur = function () {
        if (this.value === "") {
            this.value = "iphone";
        }
        //else if(this.value="iphone"){
        //    this.value="iphone"
        //}
    }*/
    btn.onclick = function () {
        var box = document.getElementById("box");
        box.style.width = '100px';
        box.style.height = '100px';
        box.style.backgroundColor = '#ff3040';
       // box.style.position = "relative";
       // box.style.left = "200px";
       // box.style.right = "200px";
    }
</script>
</body>
</html>